Fix CI test flakiness from leaked sys.modules mutations in import-independence property tests#30
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/AperturePlus/augmented-codebase-indexer/sessions/1cc36141-56c1-4001-89ca-4efa9892c6de Co-authored-by: AperturePlus <146049978+AperturePlus@users.noreply.github.com>
Agent-Logs-Url: https://github.com/AperturePlus/augmented-codebase-indexer/sessions/1cc36141-56c1-4001-89ca-4efa9892c6de Co-authored-by: AperturePlus <146049978+AperturePlus@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
AperturePlus
April 14, 2026 06:16
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI failures were caused by cross-test module identity drift: import-independence property tests cleared
aci*entries fromsys.modulesglobally and left later tests comparing objects from different module instances. This manifested asisinstance(...)failures in graph model assertions.Root cause addressed: isolate and restore module cache state
get_transitive_imports()in:tests/property/test_http_server_independence_properties.pytests/property/test_mcp_server_independence_properties.pyaci*modulesaci*modules to measure transitive imports from a clean stateaci*modules infinallyto avoid leaking interpreter stateCleanup for readability/maintainability
_is_aci_module(name: str) -> boolhelper in both files to centralize module-name matching logic.Example of the key change pattern: